import { createRouter, createWebHistory } from 'vue-router'
import Recommend from '@/views/recommend/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/recommend'
    },
    {
      path: '/recommend',
      component: Recommend,
      meta: {
        hasTabbar: true
      },
      children: [
        {
          path: ':id',
          component: () => import('@/views/recommend/album.vue'),
          meta: {
            hasTabbar: false
          }
        }
      ]
    },
    {
      path: '/singer',
      component: () => import('@/views/singer/index.vue'),
      meta: {
        hasTabbar: true
      },
      children: [
        {
          path: ':id',
          component: () => import('@/views/singer/singer-detail.vue'),
          meta: {
            hasTabbar: false
          }
        }
      ]
    },
    {
      path: '/top-list',
      component: () => import('@/views/top-list/index.vue'),
      meta: {
        hasTabbar: true
      },
      children: [
        {
          path: ':id',
          component: () => import('@/views/top-list/rank-detail.vue'),
          meta: {
            hasTabbar: false
          }
        }
      ]
    }
  ]
})

export default router
